<?php

namespace JLPay\Models\Ledger\BalanceSplit;

use JLPay\Models\BaseRequest;

/**
 * 余额退款请求
 */
class BalanceRefundRequest extends BaseRequest
{
    /**
     * API URL
     */
    public const API_URL = '/open/ledger/balance/refund';

    protected ?string $orgCode = null;
    protected ?string $mchId = null;
    protected ?string $outOrderNo = null;
    protected ?string $outReturnNo = null;
    protected ?string $revMchId = null;
    protected ?string $amount = null;
    protected ?string $description = null;

    /**
     * 设置机构代码
     *
     * @param string $orgCode
     * @return self
     */
    public function setOrgCode(string $orgCode): self
    {
        $this->orgCode = $orgCode;
        return $this;
    }

    /**
     * 设置商户号
     *
     * @param string $mchId
     * @return self
     */
    public function setMchId(string $mchId): self
    {
        $this->mchId = $mchId;
        return $this;
    }

    /**
     * 设置外部订单号
     *
     * @param string $outOrderNo
     * @return self
     */
    public function setOutOrderNo(string $outOrderNo): self
    {
        $this->outOrderNo = $outOrderNo;
        return $this;
    }

    /**
     * 设置外部退款号
     *
     * @param string $outReturnNo
     * @return self
     */
    public function setOutReturnNo(string $outReturnNo): self
    {
        $this->outReturnNo = $outReturnNo;
        return $this;
    }

    /**
     * 设置接收方商户号
     *
     * @param string $revMchId
     * @return self
     */
    public function setRevMchId(string $revMchId): self
    {
        $this->revMchId = $revMchId;
        return $this;
    }

    /**
     * 设置退款金额
     *
     * @param string $amount
     * @return self
     */
    public function setAmount(string $amount): self
    {
        $this->amount = $amount;
        return $this;
    }

    /**
     * 设置退款描述
     *
     * @param string $description
     * @return self
     */
    public function setDescription(string $description): self
    {
        $this->description = $description;
        return $this;
    }

    /**
     * 获取机构代码
     *
     * @return string|null
     */
    public function getOrgCode(): ?string
    {
        return $this->orgCode;
    }

    /**
     * 获取商户号
     *
     * @return string|null
     */
    public function getMchId(): ?string
    {
        return $this->mchId;
    }

    /**
     * 获取外部订单号
     *
     * @return string|null
     */
    public function getOutOrderNo(): ?string
    {
        return $this->outOrderNo;
    }

    /**
     * 获取外部退款号
     *
     * @return string|null
     */
    public function getOutReturnNo(): ?string
    {
        return $this->outReturnNo;
    }

    /**
     * 获取接收方商户号
     *
     * @return string|null
     */
    public function getRevMchId(): ?string
    {
        return $this->revMchId;
    }

    /**
     * 获取退款金额
     *
     * @return string|null
     */
    public function getAmount(): ?string
    {
        return $this->amount;
    }

    /**
     * 获取退款描述
     *
     * @return string|null
     */
    public function getDescription(): ?string
    {
        return $this->description;
    }
} 